package com.fenqing.utils;

import cn.hutool.core.lang.TypeReference;
import cn.hutool.json.JSONUtil;

import java.util.List;

/**
 * 字符串转双重数组
 * @author fenqing
 */
public class StringToIntTwoListEncoder implements Encoder<String, List<List<Integer>>> {

    public StringToIntTwoListEncoder() {
    }

    @Override
    public List<List<Integer>> encoder(String input) {
        return JSONUtil.parseArray(input).toBean(new TypeReference<>() {
        });
    }
}